﻿@page "/"
@namespace BlzOidc.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@using Microsoft.AspNetCore.Authentication
@using BlzOidc.Data
@{
    Layout = "_Layout";
}

@{
    var tokens = new TokenProvider
            {
                AccessToken = await HttpContext.GetTokenAsync("access_token"),
                RefreshToken = await HttpContext.GetTokenAsync("refresh_token")
            };

    //var tokenProvider = HttpContext.RequestServices.GetRequiredService<TokenProvider>();
    //tokenProvider.AccessToken = tokens.AccessToken;
    //tokenProvider.RefreshToken = tokens.RefreshToken;
}

<component type="typeof(App)" render-mode="ServerPrerendered" param-InitialToken="tokens" />
